{extend name="public/base" /}
{block name="pjax_container"}
<?php
    $titleTypeName = '公告详情';
?>
<section class="content-header">
    <h4>{$titleTypeName}</h4>
    <ol class="breadcrumb">
        <li class="active"><i class="fa fa-dashboard"></i> {$titleTypeName}</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" method="POST"
                  action="/{$Think.MODULE_NAME}/{$Think.CONTROLLER_NAME}/{$Think.ACTION_NAME}" onsubmit="return false">
                <div class="nav-tabs-custom">
                    <ul class="nav nav-tabs">
                        <li class="pull-right"><a href="javascript:history.back(-1)" class="btn btn-sm"
                                                  style="padding:10px 2px;"><i class="fa fa-list"></i> 返回</a></li>
                    </ul>
                    <div class="tab-content">
                        <ul class="nav nav-tabs" style="margin-bottom: 40px;">
                            <li role="presentation" class="fq_nav fq_nav_1 active"><a href="#">公告</a></li>
                            <li role="presentation" class="fq_nav fq_nav_2"><a href="#">阅读人</a></li>
                            <li role="presentation" class="fq_nav fq_nav_3"><a href="#">审批</a></li>
                        </ul>
                        <div class=" tab_1">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">公告名称</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    {$task.name}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">公告内容</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    {$task.content}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">阅读奖分</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    B{$task.read_integral}分
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">未读扣分</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    B{$task.not_read_integral}分
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">截止时间</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    {:date('Y-m-d H:i',$task.end_time)}
                                </div>
                            </div>
                        </div>
                        <div style="display: none;" class=" tab_2">
                            <table class="table table-striped" style="text-align: center;">
                                <tr>
                                    <th style="text-align: center;">姓名</th>
                                    <th style="text-align: center;">工号</th>
                                    <th style="text-align: center;">部门</th>
                                </tr>
                                {volist name="$read" id="v"}
                                <tr>
                                    <td>{$v.name}</td>
                                    <td>{$v.job_number}</td>
                                    <td>{$v.department_name}</td>
                                </tr>
                                {/volist}
                            </table>
                        </div>
                        <div style="display: none;" class=" tab_3">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">终审</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    <div>{$task.c_name}</div>
                                    {if condition="$task.status gt 1"}
                                    <div>审核通过</div>
                                    <div>{:date('Y-m-d H:i',$task.last_check_time)}</div>
                                    {else:}
                                    <div>待审核</div>
                                    {/if}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">初审</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    <div>{$task.b_name}</div>
                                    {if condition="$task.status gt 0"}
                                    <div>审核通过</div>
                                    <div>{:date('Y-m-d H:i',$task.first_check_time)}</div>
                                    {else:}
                                    <div>待审核</div>
                                    {/if}
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">记录人</label>
                                <div class="col-sm-7" style="padding-top: 7px;">
                                    <div>{$task.d_name}</div>
                                    <div>记录人奖分：B {$integral}分</div>
                                    <div>{:date('Y-m-d H:i',$task.create_time)}</div>
                                </div>
                            </div>
                        </div>
                    </div>


                </div>
            </form>
        </div>
    </div>
</section>
<script type="application/javascript">
    $(document).ready(function () {
        /*ajax页面加载icheck，有该控件的页面才需要*/
        $(".select2").select2({language: "zh-CN"});

    })
    $('.minimal').on('click', function () {
        var type = $(this).val();
        if (type == 2) {
            $('.check').show();
        } else if (type == 1) {
            $('.check').hide();
        }

    });
</script>
<script>
    $('.fq_nav').click(function () {
        $('.fq_nav').removeClass('active');
        $(this).addClass('active')
    })
    $('.fq_nav_1').click(function () {
        $('.tab_1').show();
        $('.tab_2').hide();
        $('.tab_3').hide();
        $('.tab_4').hide();
    })
    $('.fq_nav_2').click(function () {
        $('.tab_1').hide();
        $('.tab_2').show();
        $('.tab_3').hide();
        $('.tab_4').hide();
    })
    $('.fq_nav_3').click(function () {
        $('.tab_1').hide();
        $('.tab_2').hide();
        $('.tab_3').show();
        $('.tab_4').hide();
    })
    $('.fq_nav_4').click(function () {
        $('.tab_1').hide();
        $('.tab_2').hide();
        $('.tab_3').hide();
        $('.tab_4').show();
    })
</script>
{/block}
